summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFangrui Song <maskray@google.com>2018-07-27 05:38:14 +0000
committerFangrui Song <maskray@google.com>2018-07-27 05:38:14 +0000
commita8301fce51cf6f55f53a3b8d1d61230a451a3153 (patch)
tree59efa92eb7186285d95cc74e45ef38a5669f2793
parent1cb062b04150c622a1681fa98ef2a43d66809885 (diff)
downloadbcm5719-llvm-a8301fce51cf6f55f53a3b8d1d61230a451a3153.tar.gz
bcm5719-llvm-a8301fce51cf6f55f53a3b8d1d61230a451a3153.zip
Replace LLVM_ALIGNAS with alignas as a follow-up of r337330
The minimum required GCC version was raised to 4.8 (which started to support alignas) in r284497. llvm-svn: 338099
-rw-r--r--llvm/include/llvm/BinaryFormat/MachO.h2
-rw-r--r--llvm/include/llvm/ProfileData/InstrProf.h2
-rw-r--r--llvm/include/llvm/Support/AlignOf.h2
-rw-r--r--llvm/include/llvm/Support/TrailingObjects.h16
-rw-r--r--llvm/lib/Analysis/GlobalsModRef.cpp2
5 files changed, 12 insertions, 12 deletions
diff --git a/llvm/include/llvm/BinaryFormat/MachO.h b/llvm/include/llvm/BinaryFormat/MachO.h
index 2eacc6d8cc0..c5294c76ebf 100644
--- a/llvm/include/llvm/BinaryFormat/MachO.h
+++ b/llvm/include/llvm/BinaryFormat/MachO.h
@@ -1974,7 +1974,7 @@ const uint32_t PPC_THREAD_STATE_COUNT =
#define LOAD_COMMAND_STRUCT(LCStruct) LCStruct LCStruct##_data;
LLVM_PACKED_START
-union LLVM_ALIGNAS(4) macho_load_command {
+union alignas(4) macho_load_command {
#include "llvm/BinaryFormat/MachO.def"
};
LLVM_PACKED_END
diff --git a/llvm/include/llvm/ProfileData/InstrProf.h b/llvm/include/llvm/ProfileData/InstrProf.h
index dd440c6822b..206142b3565 100644
--- a/llvm/include/llvm/ProfileData/InstrProf.h
+++ b/llvm/include/llvm/ProfileData/InstrProf.h
@@ -1021,7 +1021,7 @@ template <> inline uint64_t getMagic<uint32_t>() {
// compiler-rt/lib/profile/InstrProfiling.h.
// It should also match the synthesized type in
// Transforms/Instrumentation/InstrProfiling.cpp:getOrCreateRegionCounters.
-template <class IntPtrT> struct LLVM_ALIGNAS(8) ProfileData {
+template <class IntPtrT> struct alignas(8) ProfileData {
#define INSTR_PROF_DATA(Type, LLVMType, Name, Init) Type Name;
#include "llvm/ProfileData/InstrProfData.inc"
};
diff --git a/llvm/include/llvm/Support/AlignOf.h b/llvm/include/llvm/Support/AlignOf.h
index 5186ce0dc25..9e7a62b85e3 100644
--- a/llvm/include/llvm/Support/AlignOf.h
+++ b/llvm/include/llvm/Support/AlignOf.h
@@ -34,7 +34,7 @@ namespace llvm {
template<std::size_t Alignment, std::size_t Size>
struct AlignedCharArray {
- LLVM_ALIGNAS(Alignment) char buffer[Size];
+ alignas(Alignment) char buffer[Size];
};
#else // _MSC_VER
diff --git a/llvm/include/llvm/Support/TrailingObjects.h b/llvm/include/llvm/Support/TrailingObjects.h
index cb5a52b0d86..490bd94f4cd 100644
--- a/llvm/include/llvm/Support/TrailingObjects.h
+++ b/llvm/include/llvm/Support/TrailingObjects.h
@@ -89,25 +89,25 @@ protected:
};
/// This helper template works-around MSVC 2013's lack of useful
-/// alignas() support. The argument to LLVM_ALIGNAS(), in MSVC, is
+/// alignas() support. The argument to alignas(), in MSVC, is
/// required to be a literal integer. But, you *can* use template
-/// specialization to select between a bunch of different LLVM_ALIGNAS
+/// specialization to select between a bunch of different alignas()
/// expressions...
template <int Align>
class TrailingObjectsAligner : public TrailingObjectsBase {};
template <>
-class LLVM_ALIGNAS(1) TrailingObjectsAligner<1> : public TrailingObjectsBase {};
+class alignas(1) TrailingObjectsAligner<1> : public TrailingObjectsBase {};
template <>
-class LLVM_ALIGNAS(2) TrailingObjectsAligner<2> : public TrailingObjectsBase {};
+class alignas(2) TrailingObjectsAligner<2> : public TrailingObjectsBase {};
template <>
-class LLVM_ALIGNAS(4) TrailingObjectsAligner<4> : public TrailingObjectsBase {};
+class alignas(4) TrailingObjectsAligner<4> : public TrailingObjectsBase {};
template <>
-class LLVM_ALIGNAS(8) TrailingObjectsAligner<8> : public TrailingObjectsBase {};
+class alignas(8) TrailingObjectsAligner<8> : public TrailingObjectsBase {};
template <>
-class LLVM_ALIGNAS(16) TrailingObjectsAligner<16> : public TrailingObjectsBase {
+class alignas(16) TrailingObjectsAligner<16> : public TrailingObjectsBase {
};
template <>
-class LLVM_ALIGNAS(32) TrailingObjectsAligner<32> : public TrailingObjectsBase {
+class alignas(32) TrailingObjectsAligner<32> : public TrailingObjectsBase {
};
// Just a little helper for transforming a type pack into the same
diff --git a/llvm/lib/Analysis/GlobalsModRef.cpp b/llvm/lib/Analysis/GlobalsModRef.cpp
index 44d61a94422..197aee9dacb 100644
--- a/llvm/lib/Analysis/GlobalsModRef.cpp
+++ b/llvm/lib/Analysis/GlobalsModRef.cpp
@@ -65,7 +65,7 @@ class GlobalsAAResult::FunctionInfo {
/// Build a wrapper struct that has 8-byte alignment. All heap allocations
/// should provide this much alignment at least, but this makes it clear we
/// specifically rely on this amount of alignment.
- struct LLVM_ALIGNAS(8) AlignedMap {
+ struct alignas(8) AlignedMap {
AlignedMap() {}
AlignedMap(const AlignedMap &Arg) : Map(Arg.Map) {}
GlobalInfoMapType Map;
OpenPOWER on IntegriCloud