aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/IR/Value.cpp
diff options
context:
space:
mode:
authorRahul Joshi <rjoshi@nvidia.com>2025-10-03 05:00:40 -0700
committerGitHub <noreply@github.com>2025-10-03 05:00:40 -0700
commit4d32ea87673adaa5252545ca82fa6cd58b134ff9 (patch)
treea21d6514683357c7a4f9735c1a044b0be1a30016 /llvm/lib/IR/Value.cpp
parentc2765b74ed2bb71bebe96c7dd49f69ade714e5a8 (diff)
downloadllvm-4d32ea87673adaa5252545ca82fa6cd58b134ff9.zip
llvm-4d32ea87673adaa5252545ca82fa6cd58b134ff9.tar.gz
llvm-4d32ea87673adaa5252545ca82fa6cd58b134ff9.tar.bz2
[NFC][LLVM][IR] Fix namespace usage in several files (#161756)
- Move standalone functions/variables out of anonymous namespace and make them static. - Use `using namespace llvm` instead of wrapping all the code in a file in `namespace llvm { }`. - Restrict anonymous namespace to just class/struct/enum declarations.
Diffstat (limited to 'llvm/lib/IR/Value.cpp')
-rw-r--r--llvm/lib/IR/Value.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/Value.cpp b/llvm/lib/IR/Value.cpp
index a347609..b775cbb 100644
--- a/llvm/lib/IR/Value.cpp
+++ b/llvm/lib/IR/Value.cpp
@@ -622,6 +622,7 @@ enum PointerStripKind {
PSK_InBoundsConstantIndices,
PSK_InBounds
};
+} // end anonymous namespace
template <PointerStripKind StripKind> static void NoopCallback(const Value *) {}
@@ -696,7 +697,6 @@ static const Value *stripPointerCastsAndOffsets(
return V;
}
-} // end anonymous namespace
const Value *Value::stripPointerCasts() const {
return stripPointerCastsAndOffsets<PSK_ZeroIndices>(this);