summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorYonghong Song <yhs@fb.com>2019-11-22 08:45:37 -0800
committerYonghong Song <yhs@fb.com>2019-12-22 18:28:50 -0800
commite3d8ee35e4adca664a9149536e0f0b3b0ceaeaeb (patch)
treeded82c55a7ed0ed13f581caa8742bd25337832f9 /llvm/lib/IR/DIBuilder.cpp
parentfb53396c49493e3dfd51bb75ca822bd9896210f6 (diff)
downloadbcm5719-llvm-e3d8ee35e4adca664a9149536e0f0b3b0ceaeaeb.tar.gz
bcm5719-llvm-e3d8ee35e4adca664a9149536e0f0b3b0ceaeaeb.zip
reland "[DebugInfo] Support to emit debugInfo for extern variables"
Commit d77ae1552fc21a9f3877f3ed7e13d631f517c825 ("[DebugInfo] Support to emit debugInfo for extern variables") added deebugInfo for extern variables for BPF target. The commit is reverted by 891e25b02d760d0de18c7d46947913b3166047e7 as the committed tests using %clang instead of %clang_cc1 causing test failed in certain scenarios as reported by Reid Kleckner. This patch fixed the tests by using %clang_cc1. Differential Revision: https://reviews.llvm.org/D71818
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index d918551a67c..9f5811d41b9 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -640,13 +640,14 @@ static void checkGlobalVariableScope(DIScope *Context) {
DIGlobalVariableExpression *DIBuilder::createGlobalVariableExpression(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F,
- unsigned LineNumber, DIType *Ty, bool isLocalToUnit, DIExpression *Expr,
+ unsigned LineNumber, DIType *Ty, bool isLocalToUnit,
+ bool isDefined, DIExpression *Expr,
MDNode *Decl, MDTuple *templateParams, uint32_t AlignInBits) {
checkGlobalVariableScope(Context);
auto *GV = DIGlobalVariable::getDistinct(
VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
- LineNumber, Ty, isLocalToUnit, true, cast_or_null<DIDerivedType>(Decl),
+ LineNumber, Ty, isLocalToUnit, isDefined, cast_or_null<DIDerivedType>(Decl),
templateParams, AlignInBits);
if (!Expr)
Expr = createExpression();
OpenPOWER on IntegriCloud