summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/DiagnosticInfo.cpp
diff options
context:
space:
mode:
authorAhmed Bougacha <ahmed.bougacha@gmail.com>2017-02-15 20:38:28 +0000
committerAhmed Bougacha <ahmed.bougacha@gmail.com>2017-02-15 20:38:28 +0000
commit360260066e52b3e4028deae8bf5157a72d428929 (patch)
tree0279b65bbcbe0588cac4b5de9823f4ff074179ee /llvm/lib/IR/DiagnosticInfo.cpp
parentf9e5a1dd888435996e3925e1680e3140084474ec (diff)
downloadbcm5719-llvm-360260066e52b3e4028deae8bf5157a72d428929.tar.gz
bcm5719-llvm-360260066e52b3e4028deae8bf5157a72d428929.zip
[OptDiag] Pass const Values/Types to Argument. NFC.
llvm-svn: 295228
Diffstat (limited to 'llvm/lib/IR/DiagnosticInfo.cpp')
-rw-r--r--llvm/lib/IR/DiagnosticInfo.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/IR/DiagnosticInfo.cpp b/llvm/lib/IR/DiagnosticInfo.cpp
index d27eb7672d8..ad172486d37 100644
--- a/llvm/lib/IR/DiagnosticInfo.cpp
+++ b/llvm/lib/IR/DiagnosticInfo.cpp
@@ -171,7 +171,7 @@ const std::string DiagnosticInfoWithDebugLocBase::getLocationStr() const {
return (Filename + ":" + Twine(Line) + ":" + Twine(Column)).str();
}
-DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, Value *V)
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, const Value *V)
: Key(Key) {
if (auto *F = dyn_cast<Function>(V)) {
if (DISubprogram *SP = F->getSubprogram())
@@ -191,7 +191,7 @@ DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, Value *V)
Val = I->getOpcodeName();
}
-DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, Type *T)
+DiagnosticInfoOptimizationBase::Argument::Argument(StringRef Key, const Type *T)
: Key(Key) {
raw_string_ostream OS(Val);
OS << *T;
OpenPOWER on IntegriCloud