1
Fork 0

Generate basic debug info for files, functions and compile units.

This commit is contained in:
Josh Matthews 2011-11-10 00:55:09 -05:00
parent fa27724a4b
commit 10030a37d5
7 changed files with 222 additions and 3 deletions

View file

@ -165,3 +165,17 @@ extern "C" LLVMValueRef LLVMGetOrInsertFunction(LLVMModuleRef M,
return wrap(unwrap(M)->getOrInsertFunction(Name,
unwrap<FunctionType>(FunctionTy)));
}
extern "C" LLVMTypeRef LLVMMetadataTypeInContext(LLVMContextRef C) {
return wrap(Type::getMetadataTy(*unwrap(C)));
}
extern "C" LLVMTypeRef LLVMMetadataType(void) {
return LLVMMetadataTypeInContext(LLVMGetGlobalContext());
}
extern "C" void LLVMAddNamedMetadataOperand(LLVMModuleRef M, const char *Str,
unsigned SLen, LLVMValueRef Val)
{
NamedMDNode *N = unwrap(M)->getOrInsertNamedMetadata(StringRef(Str, SLen));
N->addOperand(unwrap<MDNode>(Val));
}

View file

@ -487,6 +487,7 @@ LLVMMDNode
LLVMMDNodeInContext
LLVMMDString
LLVMMDStringInContext
LLVMAddNamedMetadataOperand
LLVMModuleCreateWithName
LLVMModuleCreateWithNameInContext
LLVMMoveBasicBlockAfter