summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DIBuilder.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2016-12-16 01:00:30 +0000
committerAdrian Prantl <aprantl@apple.com>2016-12-16 01:00:30 +0000
commit03c6d31a3b308afb2c6a4c506002c88c48c9d58d (patch)
tree755debe0ba8d4df68b9f524f8f689e15b4ec1a4f /llvm/lib/IR/DIBuilder.cpp
parent6f1daa4660edb7f401c67b3e23d213bce103bca9 (diff)
downloadbcm5719-llvm-03c6d31a3b308afb2c6a4c506002c88c48c9d58d.tar.gz
bcm5719-llvm-03c6d31a3b308afb2c6a4c506002c88c48c9d58d.zip
Revert "[IR] Remove the DIExpression field from DIGlobalVariable."
This reverts commit 289902 while investigating bot berakage. llvm-svn: 289906
Diffstat (limited to 'llvm/lib/IR/DIBuilder.cpp')
-rw-r--r--llvm/lib/IR/DIBuilder.cpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/llvm/lib/IR/DIBuilder.cpp b/llvm/lib/IR/DIBuilder.cpp
index d009322a572..dfca6895590 100644
--- a/llvm/lib/IR/DIBuilder.cpp
+++ b/llvm/lib/IR/DIBuilder.cpp
@@ -532,30 +532,29 @@ static void checkGlobalVariableScope(DIScope *Context) {
#endif
}
-DIGlobalVariableExpression *DIBuilder::createGlobalVariableExpression(
+DIGlobalVariable *DIBuilder::createGlobalVariable(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F,
- unsigned LineNumber, DIType *Ty, bool isLocalToUnit, DIExpression *Expr,
- MDNode *Decl, uint32_t AlignInBits) {
+ unsigned LineNumber, DIType *Ty, bool isLocalToUnit,
+ DIExpression *Expr, MDNode *Decl, uint32_t AlignInBits) {
checkGlobalVariableScope(Context);
- auto *GV = DIGlobalVariable::getDistinct(
+ auto *N = DIGlobalVariable::getDistinct(
VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
- LineNumber, Ty, isLocalToUnit, true, cast_or_null<DIDerivedType>(Decl),
- AlignInBits);
- auto *N = DIGlobalVariableExpression::get(VMContext, GV, Expr);
+ LineNumber, Ty, isLocalToUnit, true, Expr,
+ cast_or_null<DIDerivedType>(Decl), AlignInBits);
AllGVs.push_back(N);
return N;
}
DIGlobalVariable *DIBuilder::createTempGlobalVariableFwdDecl(
DIScope *Context, StringRef Name, StringRef LinkageName, DIFile *F,
- unsigned LineNumber, DIType *Ty, bool isLocalToUnit, MDNode *Decl,
- uint32_t AlignInBits) {
+ unsigned LineNumber, DIType *Ty, bool isLocalToUnit,
+ DIExpression *Expr, MDNode *Decl, uint32_t AlignInBits) {
checkGlobalVariableScope(Context);
return DIGlobalVariable::getTemporary(
VMContext, cast_or_null<DIScope>(Context), Name, LinkageName, F,
- LineNumber, Ty, isLocalToUnit, false,
+ LineNumber, Ty, isLocalToUnit, false, Expr,
cast_or_null<DIDerivedType>(Decl), AlignInBits)
.release();
}
OpenPOWER on IntegriCloud