diff options
author | Reid Spencer <rspencer@reidspencer.com> | 2006-12-12 01:17:41 +0000 |
---|---|---|
committer | Reid Spencer <rspencer@reidspencer.com> | 2006-12-12 01:17:41 +0000 |
commit | 15f46d6c280cc91be70c60ed181931fbe0088652 (patch) | |
tree | 07819b1afebb41775b1df6a9e8bc7536249d68c4 /lib/CodeGen/MachineDebugInfo.cpp | |
parent | f64945d83c61e540a448de0d0d23cda67c92ebe5 (diff) |
Change inferred cast creation calls to more specific cast creations.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/MachineDebugInfo.cpp')
-rw-r--r-- | lib/CodeGen/MachineDebugInfo.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/CodeGen/MachineDebugInfo.cpp b/lib/CodeGen/MachineDebugInfo.cpp index bc75ccb7a6..d3b6ecb469 100644 --- a/lib/CodeGen/MachineDebugInfo.cpp +++ b/lib/CodeGen/MachineDebugInfo.cpp @@ -292,7 +292,7 @@ public: if (GV) { // Set to pointer to global. - Elements.push_back(ConstantExpr::getCast(GV, EmptyTy)); + Elements.push_back(ConstantExpr::getBitCast(GV, EmptyTy)); } else { // Use NULL. Elements.push_back(ConstantPointerNull::get(EmptyTy)); @@ -301,7 +301,7 @@ public: virtual void Apply(GlobalVariable *&Field) { const PointerType *EmptyTy = SR.getEmptyStructPtrType(); if (Field) { - Elements.push_back(ConstantExpr::getCast(Field, EmptyTy)); + Elements.push_back(ConstantExpr::getBitCast(Field, EmptyTy)); } else { Elements.push_back(ConstantPointerNull::get(EmptyTy)); } @@ -315,7 +315,7 @@ public: for (unsigned i = 0, N = Field.size(); i < N; ++i) { if (DebugInfoDesc *Element = Field[i]) { GlobalVariable *GVE = SR.Serialize(Element); - Constant *CE = ConstantExpr::getCast(GVE, EmptyTy); + Constant *CE = ConstantExpr::getBitCast(GVE, EmptyTy); ArrayElements.push_back(cast<Constant>(CE)); } else { ArrayElements.push_back(ConstantPointerNull::get(EmptyTy)); @@ -328,7 +328,7 @@ public: CA, "llvm.dbg.array", SR.getModule()); CAGV->setSection("llvm.metadata"); - Constant *CAE = ConstantExpr::getCast(CAGV, EmptyTy); + Constant *CAE = ConstantExpr::getBitCast(CAGV, EmptyTy); Elements.push_back(CAE); } }; @@ -1323,7 +1323,7 @@ Constant *DISerializer::getString(const std::string &String) { ConstStr, "str", M); StrGV->setSection("llvm.metadata"); // Convert to generic string pointer. - Slot = ConstantExpr::getCast(StrGV, getStrPtrType()); + Slot = ConstantExpr::getBitCast(StrGV, getStrPtrType()); } return Slot; |