diff options
author | Owen Anderson <resistor@mac.com> | 2007-09-07 04:06:50 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2007-09-07 04:06:50 +0000 |
commit | 718cb665ca6ce2bc4d8e8479f46a45db91b49f86 (patch) | |
tree | 51ddca6b6eead9bf38aafd5507e6c3c06048f0ad /lib/VMCore/Mangler.cpp | |
parent | af992f782fb2cac8d00b352c3dd73f6e782b5758 (diff) |
Add lengthof and endof templates that hide a lot of sizeof computations.
Patch by Sterling Stein!
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@41758 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/Mangler.cpp')
-rw-r--r-- | lib/VMCore/Mangler.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/lib/VMCore/Mangler.cpp b/lib/VMCore/Mangler.cpp index 353732f9c1..52e3d0db9b 100644 --- a/lib/VMCore/Mangler.cpp +++ b/lib/VMCore/Mangler.cpp @@ -14,6 +14,7 @@ #include "llvm/Support/Mangler.h" #include "llvm/DerivedTypes.h" #include "llvm/Module.h" +#include "llvm/ADT/STLExtras.h" #include "llvm/ADT/StringExtras.h" using namespace llvm; @@ -185,9 +186,7 @@ void Mangler::InsertName(GlobalValue *GV, Mangler::Mangler(Module &M, const char *prefix) : Prefix(prefix), UseQuotes(false), PreserveAsmNames(false), Count(0), TypeCounter(0) { - std::fill(AcceptableChars, - AcceptableChars+sizeof(AcceptableChars)/sizeof(AcceptableChars[0]), - 0); + std::fill(AcceptableChars, array_endof(AcceptableChars), 0); // Letters and numbers are acceptable. for (unsigned char X = 'a'; X <= 'z'; ++X) |