diff options
author | Rahul Joshi <rjoshi@nvidia.com> | 2025-10-03 05:00:40 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-03 05:00:40 -0700 |
commit | 4d32ea87673adaa5252545ca82fa6cd58b134ff9 (patch) | |
tree | a21d6514683357c7a4f9735c1a044b0be1a30016 /llvm/lib/IR/Value.cpp | |
parent | c2765b74ed2bb71bebe96c7dd49f69ade714e5a8 (diff) | |
download | llvm-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.cpp | 2 |
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); |