[llvm-commits] [llvm-gcc-4.2] r83504 - /llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Bill Wendling
isanbard at gmail.com
Wed Oct 7 16:25:17 PDT 2009
Author: void
Date: Wed Oct 7 18:25:17 2009
New Revision: 83504
URL: http://llvm.org/viewvc/llvm-project?rev=83504&view=rev
Log:
Temporarily revert r83493. It was causing a bootstrapping failure.
Modified:
llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
Modified: llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp?rev=83504&r1=83503&r2=83504&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp (original)
+++ llvm-gcc-4.2/trunk/gcc/llvm-convert.cpp Wed Oct 7 18:25:17 2009
@@ -301,9 +301,6 @@
// Create an alloca for the ResultDecl.
Value *Tmp = TheTreeToLLVM->CreateTemporary(AI->getType());
Builder.CreateStore(AI, Tmp);
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- Builder.SetDebugLocation(cast<llvm::Instruction>(Tmp));
-#endif
SET_DECL_LLVM(ResultDecl, Tmp);
if (TheDebugInfo) {
@@ -602,9 +599,6 @@
Tmp->setName(std::string(Name)+"_addr");
SET_DECL_LLVM(Args, Tmp);
if (TheDebugInfo) {
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- Builder.SetDebugLocation(cast<llvm::Instruction>(Tmp));
-#endif
TheDebugInfo->EmitDeclare(Args, dwarf::DW_TAG_arg_variable,
Name, TREE_TYPE(Args), Tmp,
Builder.GetInsertBlock());
@@ -700,6 +694,10 @@
}
}
}
+ if (TheDebugInfo) {
+ TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder);
+ TheDebugInfo->EmitFunctionEnd(Builder.GetInsertBlock(), true);
+ }
if (RetVals.empty())
Builder.CreateRetVoid();
else if (!Fn->getReturnType()->isAggregateType()) {
@@ -725,11 +723,6 @@
SI->setSuccessor(0, SI->getSuccessor(1));
}
- if (TheDebugInfo) {
- TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder);
- TheDebugInfo->EmitFunctionEnd(Builder.GetInsertBlock(), true);
- }
-
// Remove any cached LLVM values that are local to this function. Such values
// may be deleted when the optimizers run, so would be dangerous to keep.
eraseLocalLLVMValues();
@@ -1207,11 +1200,6 @@
/// CreateTempLoc - Like CreateTemporary, but returns a MemRef.
MemRef TreeToLLVM::CreateTempLoc(const Type *Ty) {
AllocaInst *AI = CreateTemporary(Ty);
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo)
- Builder.SetDebugLocation(AI);
-#endif
-
// MemRefs do not allow alignment 0.
if (!AI->getAlignment())
AI->setAlignment(TD.getPrefTypeAlignment(Ty));
@@ -1711,12 +1699,6 @@
// Create a temporary for the value to be switched on.
IndirectGotoValue = CreateTemporary(TD.getIntPtrType(Context));
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo) {
- TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder);
- Builder.SetDebugLocation(cast<llvm::Instruction>(IndirectGotoValue));
- }
-#endif
// Create the block, emit a load, and emit the switch in the block.
IndirectGotoBlock = BasicBlock::Create(Context, "indirectgoto");
@@ -2509,10 +2491,6 @@
// A value. Store to a temporary, and return the temporary's address.
// Any future access to this argument will reuse the same address.
Loc = TheTreeToLLVM->CreateTemporary(TheValue->getType());
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo)
- Builder.SetDebugLocation(cast<llvm::Instruction>(Loc));
-#endif
Builder.CreateStore(TheValue, Loc);
}
return Loc;
@@ -2886,10 +2864,6 @@
// Create a new temporary and set the VAR_DECL to use it as the llvm location.
Value *NewTmp = CreateTemporary(FirstVal->getType());
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo)
- Builder.SetDebugLocation(cast<llvm::Instruction>(NewTmp));
-#endif
SET_DECL_LLVM(Var, NewTmp);
// Store the already existing initial value into the alloca. If the value
@@ -6191,12 +6165,6 @@
// Emit it as a value, then store it to a temporary slot.
Value *V2 = Emit(Arg2T, 0);
Arg2 = CreateTemporary(V2->getType());
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo) {
- TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder);
- Builder.SetDebugLocation(cast<llvm::Instruction>(Arg2));
- }
-#endif
Builder.CreateStore(V2, Arg2);
} else {
// If the target has aggregate valists, then the second argument
@@ -6922,12 +6890,6 @@
} else {
// If the input is a scalar, emit to a temporary.
Value *Dest = CreateTemporary(ConvertType(TREE_TYPE(Op)));
-#ifdef ATTACH_DEBUG_INFO_TO_AN_INSN
- if (TheDebugInfo) {
- TheDebugInfo->EmitStopPoint(Fn, Builder.GetInsertBlock(), Builder);
- Builder.SetDebugLocation(cast<llvm::Instruction>(Dest));
- }
-#endif
Builder.CreateStore(Emit(Op, 0), Dest);
// The type is the type of the expression.
Dest = BitCastToType(Dest,
More information about the llvm-commits
mailing list