aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms/Instrumentation
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-13 00:50:17 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-13 00:50:17 +0000
commit7b06bd532d3324a2f76bbc856ae20ff89d8e0e92 (patch)
treecbd629912f00b8d9d35e320842aca7e1cded803e /lib/Transforms/Instrumentation
parent31b628ba6096d2b0bb5591b1231a8e4df4f6c8b8 (diff)
downloadexternal_llvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.zip
external_llvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.tar.gz
external_llvm-7b06bd532d3324a2f76bbc856ae20ff89d8e0e92.tar.bz2
Replace CastInst::createInferredCast calls with more accurate cast
creation calls. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32521 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms/Instrumentation')
-rw-r--r--lib/Transforms/Instrumentation/ProfilingUtils.cpp1
-rw-r--r--lib/Transforms/Instrumentation/TraceValues.cpp4
2 files changed, 3 insertions, 2 deletions
diff --git a/lib/Transforms/Instrumentation/ProfilingUtils.cpp b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
index 887de5b..274275a 100644
--- a/lib/Transforms/Instrumentation/ProfilingUtils.cpp
+++ b/lib/Transforms/Instrumentation/ProfilingUtils.cpp
@@ -67,6 +67,7 @@ void llvm::InsertProfilingInitCall(Function *MainFn, const char *FnName,
} else {
InitCall->setOperand(2, AI);
}
+ /* FALL THROUGH */
case 1:
AI = MainFn->arg_begin();
diff --git a/lib/Transforms/Instrumentation/TraceValues.cpp b/lib/Transforms/Instrumentation/TraceValues.cpp
index 7451b51..f6048f1 100644
--- a/lib/Transforms/Instrumentation/TraceValues.cpp
+++ b/lib/Transforms/Instrumentation/TraceValues.cpp
@@ -281,7 +281,7 @@ InsertReleaseInst(Value *V, BasicBlock *BB,
const Type *SBP = PointerType::get(Type::SByteTy);
if (V->getType() != SBP) // Cast pointer to be sbyte*
- V = CastInst::createInferredCast(V, SBP, "RPSN_cast", InsertBefore);
+ V = new BitCastInst(V, SBP, "RPSN_cast", InsertBefore);
std::vector<Value*> releaseArgs(1, V);
new CallInst(ReleasePtrFunc, releaseArgs, "", InsertBefore);
@@ -293,7 +293,7 @@ InsertRecordInst(Value *V, BasicBlock *BB,
Function* RecordPtrFunc) {
const Type *SBP = PointerType::get(Type::SByteTy);
if (V->getType() != SBP) // Cast pointer to be sbyte*
- V = CastInst::createInferredCast(V, SBP, "RP_cast", InsertBefore);
+ V = new BitCastInst(V, SBP, "RP_cast", InsertBefore);
std::vector<Value*> releaseArgs(1, V);
new CallInst(RecordPtrFunc, releaseArgs, "", InsertBefore);