summaryrefslogtreecommitdiff
path: root/lib/CodeGen/SelectionDAG/FastISel.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2013-07-10 01:53:37 +0000
committerAdrian Prantl <aprantl@apple.com>2013-07-10 01:53:37 +0000
commit45ff709caf46d9f472c9229493853dec27477935 (patch)
tree3ec1bf114eb6ab082931c5f8801cb512657001de /lib/CodeGen/SelectionDAG/FastISel.cpp
parent893ae83f421c20cf34622b355c5aaba32b2c019a (diff)
downloadllvm-45ff709caf46d9f472c9229493853dec27477935.tar.gz
llvm-45ff709caf46d9f472c9229493853dec27477935.tar.bz2
llvm-45ff709caf46d9f472c9229493853dec27477935.tar.xz
Un-break the buildbot by tweaking the indirection flag.
Pulled in a testcase from the debuginfo-test suite. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185993 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/FastISel.cpp')
-rw-r--r--lib/CodeGen/SelectionDAG/FastISel.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/FastISel.cpp b/lib/CodeGen/SelectionDAG/FastISel.cpp
index 14a2b005c0..b4ac948fc1 100644
--- a/lib/CodeGen/SelectionDAG/FastISel.cpp
+++ b/lib/CodeGen/SelectionDAG/FastISel.cpp
@@ -642,11 +642,17 @@ bool FastISel::SelectCall(const User *I) {
if (Op)
if (Op->isReg()) {
+ // Set the indirect flag if the type and the DIVariable's
+ // indirect field are in disagreement: Indirectly-addressed
+ // variables that are nonpointer types should be marked as
+ // indirect, and VLAs should be marked as indirect eventhough
+ // they are a pointer type.
+ bool IsIndirect = DI->getAddress()->getType()->isPointerTy()
+ ^ DIVar.isIndirect();
Op->setIsDebug(true);
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(TargetOpcode::DBG_VALUE),
- /* IsIndirect */ DI->getAddress()->getType()->isPointerTy(),
- Op->getReg(), Offset, DI->getVariable());
+ IsIndirect, Op->getReg(), Offset, DI->getVariable());
} else
BuildMI(*FuncInfo.MBB, FuncInfo.InsertPt, DL,
TII.get(TargetOpcode::DBG_VALUE)).addOperand(*Op).addImm(0)