[llvm] r204016 - Remove named Twine.
David Blaikie
dblaikie at gmail.com
Sat Mar 15 18:36:18 PDT 2014
Author: dblaikie
Date: Sat Mar 15 20:36:18 2014
New Revision: 204016
URL: http://llvm.org/viewvc/llvm-project?rev=204016&view=rev
Log:
Remove named Twine.
While technically correct, we generally disallow any instance of named
Twines due to their subtlety.
Modified:
llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp?rev=204016&r1=204015&r2=204016&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/SampleProfile.cpp Sat Mar 15 20:36:18 2014
@@ -972,10 +972,8 @@ unsigned SampleFunctionProfile::getFunct
}
}
- StringRef FnName = F.getName();
- Twine Msg = "No debug information found in function " + FnName;
- DiagnosticInfoSampleProfile Diag(Msg);
- F.getContext().diagnose(Diag);
+ F.getContext().diagnose(DiagnosticInfoSampleProfile(
+ "No debug information found in function " + F.getName()));
return 0;
}
More information about the llvm-commits
mailing list