LLVM  4.0.0
Macros | Functions | Variables
DebugInfoMetadata.cpp File Reference
#include "llvm/IR/DebugInfoMetadata.h"
#include "LLVMContextImpl.h"
#include "MetadataImpl.h"
#include "llvm/ADT/StringSwitch.h"
#include "llvm/IR/Function.h"
#include "llvm/IR/DebugInfoFlags.def"
Include dependency graph for DebugInfoMetadata.cpp:

Go to the source code of this file.

Macros

#define HANDLE_DI_FLAG(ID, NAME)   .Case("DIFlag" #NAME, Flag##NAME)
 
#define HANDLE_DI_FLAG(ID, NAME)
 
#define HANDLE_DI_FLAG(ID, NAME)
 
#define UNWRAP_ARGS_IMPL(...)   __VA_ARGS__
 
#define UNWRAP_ARGS(ARGS)   UNWRAP_ARGS_IMPL ARGS
 
#define DEFINE_GETIMPL_LOOKUP(CLASS, ARGS)
 
#define DEFINE_GETIMPL_STORE(CLASS, ARGS, OPS)
 
#define DEFINE_GETIMPL_STORE_NO_OPS(CLASS, ARGS)
 
#define DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS(CLASS, OPS)
 

Functions

static void adjustColumn (unsigned &Column)
 
static bool isCanonical (const MDString *S)
 

Variables

static const char * ChecksumKindName [DIFile::CSK_Last+1]
 

Macro Definition Documentation

#define DEFINE_GETIMPL_LOOKUP (   CLASS,
  ARGS 
)
Value:
do { \
if (Storage == Uniqued) { \
if (auto *N = getUniqued(Context.pImpl->CLASS##s, \
CLASS##Info::KeyTy(UNWRAP_ARGS(ARGS)))) \
return N; \
if (!ShouldCreate) \
return nullptr; \
} else { \
assert(ShouldCreate && \
"Expected non-uniqued nodes to always be created"); \
} \
} while (false)
LLVMContext & Context
static T * getUniqued(DenseSet< T *, InfoT > &Store, const typename InfoT::KeyTy &Key)
Definition: MetadataImpl.h:23
* if(!EatIfPresent(lltok::kw_thread_local)) return false
ParseOptionalThreadLocal := /*empty.
LLVMContextImpl *const pImpl
Definition: LLVMContext.h:50
#define UNWRAP_ARGS(ARGS)
#define N
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())

Definition at line 194 of file DebugInfoMetadata.cpp.

#define DEFINE_GETIMPL_STORE (   CLASS,
  ARGS,
  OPS 
)
Value:
return storeImpl(new (array_lengthof(OPS)) \
CLASS(Context, Storage, UNWRAP_ARGS(ARGS), OPS), \
Storage, Context.pImpl->CLASS##s)
LLVMContext & Context
LLVMContextImpl *const pImpl
Definition: LLVMContext.h:50
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
Definition: STLExtras.h:649
#define UNWRAP_ARGS(ARGS)

Definition at line 207 of file DebugInfoMetadata.cpp.

#define DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS (   CLASS,
  OPS 
)
Value:
return storeImpl(new (array_lengthof(OPS)) CLASS(Context, Storage, OPS), \
Storage, Context.pImpl->CLASS##s)
LLVMContext & Context
LLVMContextImpl *const pImpl
Definition: LLVMContext.h:50
constexpr size_t array_lengthof(T(&)[N])
Find the length of an array.
Definition: STLExtras.h:649

Definition at line 214 of file DebugInfoMetadata.cpp.

#define DEFINE_GETIMPL_STORE_NO_OPS (   CLASS,
  ARGS 
)
Value:
return storeImpl(new (0u) CLASS(Context, Storage, UNWRAP_ARGS(ARGS)), \
Storage, Context.pImpl->CLASS##s)
LLVMContext & Context
LLVMContextImpl *const pImpl
Definition: LLVMContext.h:50
#define UNWRAP_ARGS(ARGS)

Definition at line 211 of file DebugInfoMetadata.cpp.

#define HANDLE_DI_FLAG (   ID,
  NAME 
)    .Case("DIFlag" #NAME, Flag##NAME)

Referenced by llvm::DINode::getFlag().

#define HANDLE_DI_FLAG (   ID,
  NAME 
)
Value:
case Flag##NAME: \
return "DIFlag" #NAME;
Flag
These should be considered private to the implementation of the MCInstrDesc class.
Definition: MCInstrDesc.h:121
#define HANDLE_DI_FLAG (   ID,
  NAME 
)
Value:
if (DIFlags Bit = Flags & Flag##NAME) { \
SplitFlags.push_back(Bit); \
Flags &= ~Bit; \
}
struct fuzzer::@269 Flags
Flag
These should be considered private to the implementation of the MCInstrDesc class.
Definition: MCInstrDesc.h:121
#define UNWRAP_ARGS (   ARGS)    UNWRAP_ARGS_IMPL ARGS

Definition at line 193 of file DebugInfoMetadata.cpp.

#define UNWRAP_ARGS_IMPL (   ...)    __VA_ARGS__

Definition at line 192 of file DebugInfoMetadata.cpp.

Function Documentation

static void adjustColumn ( unsigned Column)
static

Definition at line 35 of file DebugInfoMetadata.cpp.

static bool isCanonical ( const MDString S)
static

Definition at line 159 of file DebugInfoMetadata.cpp.

References llvm::StringRef::empty(), and llvm::MDString::getString().

Variable Documentation

const char* ChecksumKindName[DIFile::CSK_Last+1]
static
Initial value:
= {
"CSK_None",
"CSK_MD5",
"CSK_SHA1"
}

Definition at line 350 of file DebugInfoMetadata.cpp.