summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-c-test
diff options
context:
space:
mode:
authorRobert Widmann <devteam.codafi@gmail.com>2018-04-28 22:32:07 +0000
committerRobert Widmann <devteam.codafi@gmail.com>2018-04-28 22:32:07 +0000
commitaec494f3c4226778057ae194d28e131d9df516d8 (patch)
treedbb25ec758a385e06da997b4209e610d06d7d20c /llvm/tools/llvm-c-test
parentda3e8c4ba791f2bcca018873c3461f636db72bb1 (diff)
downloadbcm5719-llvm-aec494f3c4226778057ae194d28e131d9df516d8.tar.gz
bcm5719-llvm-aec494f3c4226778057ae194d28e131d9df516d8.zip
[LLVM-C] Add DIBuilder bindings to create import declarations
Summary: Add bindings to create import declarations for modules, functions, types, and other entities. This wraps the conveniences available in the existing DIBuilder API, but these seem C++-specific. Reviewers: whitequark, harlanhaskins, deadalnix Reviewed By: whitequark Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D46167 llvm-svn: 331123
Diffstat (limited to 'llvm/tools/llvm-c-test')
-rw-r--r--llvm/tools/llvm-c-test/debuginfo.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/tools/llvm-c-test/debuginfo.c b/llvm/tools/llvm-c-test/debuginfo.c
index 411c4958d8c..0c3410d949e 100644
--- a/llvm/tools/llvm-c-test/debuginfo.c
+++ b/llvm/tools/llvm-c-test/debuginfo.c
@@ -36,6 +36,19 @@ int llvm_test_dibuilder(void) {
"/test/include/llvm-c-test.h", 27,
"", 0);
+ LLVMMetadataRef OtherModule =
+ LLVMDIBuilderCreateModule(DIB, CompileUnit,
+ "llvm-c-test-import", 18,
+ "", 0,
+ "/test/include/llvm-c-test-import.h", 34,
+ "", 0);
+ LLVMMetadataRef ImportedModule =
+ LLVMDIBuilderCreateImportedModuleFromModule(DIB, Module, OtherModule,
+ File, 42);
+ LLVMMetadataRef AliasImportedModule =
+ LLVMDIBuilderCreateImportedModuleFromAlias(DIB, Module, ImportedModule,
+ File, 42);
+
LLVMMetadataRef Int64Ty =
LLVMDIBuilderCreateBasicType(DIB, "Int64", 5, 64, 0);
LLVMMetadataRef GlobalVarValueExpr =
OpenPOWER on IntegriCloud