LLVM  3.7.0
Macros | Functions
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 StringRef getString (const MDString *S)
 
static bool isCanonical (const MDString *S)
 

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)
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.
#define UNWRAP_ARGS(ARGS)
#define N

Definition at line 206 of file DebugInfoMetadata.cpp.

#define DEFINE_GETIMPL_STORE (   CLASS,
  ARGS,
  OPS 
)
Value:
return storeImpl(new (ArrayRef<Metadata *>(OPS).size()) \
CLASS(Context, Storage, UNWRAP_ARGS(ARGS), OPS), \
Storage, Context.pImpl->CLASS##s)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:31
#define UNWRAP_ARGS(ARGS)
void size_t size

Definition at line 219 of file DebugInfoMetadata.cpp.

#define DEFINE_GETIMPL_STORE_NO_CONSTRUCTOR_ARGS (   CLASS,
  OPS 
)
Value:
return storeImpl(new (ArrayRef<Metadata *>(OPS).size()) \
CLASS(Context, Storage, OPS), \
Storage, Context.pImpl->CLASS##s)
ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory)...
Definition: ArrayRef.h:31
void size_t size

Definition at line 226 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)
#define UNWRAP_ARGS(ARGS)

Definition at line 223 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:97
#define HANDLE_DI_FLAG (   ID,
  NAME 
)
Value:
if (unsigned Bit = Flags & ID) { \
SplitFlags.push_back(Bit); \
Flags &= ~Bit; \
}
#define UNWRAP_ARGS (   ARGS)    UNWRAP_ARGS_IMPL ARGS

Definition at line 205 of file DebugInfoMetadata.cpp.

#define UNWRAP_ARGS_IMPL (   ...)    __VA_ARGS__

Definition at line 204 of file DebugInfoMetadata.cpp.

Function Documentation

static void adjustColumn ( unsigned Column)
static

Definition at line 35 of file DebugInfoMetadata.cpp.

static StringRef getString ( const MDString S)
static
static bool isCanonical ( const MDString S)
static

Definition at line 171 of file DebugInfoMetadata.cpp.

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