summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/include/llvm/IR/LLVMContext.h2
-rw-r--r--llvm/lib/IR/LLVMContext.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/llvm/include/llvm/IR/LLVMContext.h b/llvm/include/llvm/IR/LLVMContext.h
index cd7fcfb7c17..e1d26278e5e 100644
--- a/llvm/include/llvm/IR/LLVMContext.h
+++ b/llvm/include/llvm/IR/LLVMContext.h
@@ -108,7 +108,7 @@ public:
/// Return true if the Context runtime configuration is set to discard all
/// value names. When true, only GlobalValue names will be available in the
/// IR.
- bool discardValueNames();
+ bool discardValueNames() const;
/// Set the Context runtime configuration to discard all value name (but
/// GlobalValue). Clients can use this flag to save memory and runtime,
diff --git a/llvm/lib/IR/LLVMContext.cpp b/llvm/lib/IR/LLVMContext.cpp
index 151c2055813..49c1dc3340f 100644
--- a/llvm/lib/IR/LLVMContext.cpp
+++ b/llvm/lib/IR/LLVMContext.cpp
@@ -331,7 +331,7 @@ void LLVMContext::deleteGC(const Function &Fn) {
pImpl->GCNames.erase(&Fn);
}
-bool LLVMContext::discardValueNames() { return pImpl->DiscardValueNames; }
+bool LLVMContext::discardValueNames() const { return pImpl->DiscardValueNames; }
void LLVMContext::setDiscardValueNames(bool Discard) {
pImpl->DiscardValueNames = Discard;
OpenPOWER on IntegriCloud