Hide two different AlignMode enums in anonymous namespaces. This bug is reported by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216001 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Alexey Samsonov 2014-08-19 18:40:39 +00:00
parent 8308f0e30f
commit 2ac376ba34
2 changed files with 4 additions and 0 deletions

View File

@ -38,10 +38,12 @@ using namespace llvm;
STATISTIC(NumTailCalls, "Number of tail calls"); STATISTIC(NumTailCalls, "Number of tail calls");
STATISTIC(NumShiftInserts, "Number of vector shift inserts"); STATISTIC(NumShiftInserts, "Number of vector shift inserts");
namespace {
enum AlignMode { enum AlignMode {
StrictAlign, StrictAlign,
NoStrictAlign NoStrictAlign
}; };
}
static cl::opt<AlignMode> static cl::opt<AlignMode>
Align(cl::desc("Load/store alignment support"), Align(cl::desc("Load/store alignment support"),

View File

@ -50,11 +50,13 @@ static cl::opt<bool>
UseFusedMulOps("arm-use-mulops", UseFusedMulOps("arm-use-mulops",
cl::init(true), cl::Hidden); cl::init(true), cl::Hidden);
namespace {
enum AlignMode { enum AlignMode {
DefaultAlign, DefaultAlign,
StrictAlign, StrictAlign,
NoStrictAlign NoStrictAlign
}; };
}
static cl::opt<AlignMode> static cl::opt<AlignMode>
Align(cl::desc("Load/store alignment support"), Align(cl::desc("Load/store alignment support"),