[llvm] r338099 - Replace LLVM_ALIGNAS with alignas as a follow-up of r337330
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 26 22:38:14 PDT 2018
Author: maskray
Date: Thu Jul 26 22:38:14 2018
New Revision: 338099
URL: http://llvm.org/viewvc/llvm-project?rev=338099&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/BinaryFormat/MachO.h
llvm/trunk/include/llvm/ProfileData/InstrProf.h
llvm/trunk/include/llvm/Support/AlignOf.h
llvm/trunk/include/llvm/Support/TrailingObjects.h
llvm/trunk/lib/Analysis/GlobalsModRef.cpp
Modified: llvm/trunk/include/llvm/BinaryFormat/MachO.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/BinaryFormat/MachO.h?rev=338099&r1=338098&r2=338099&view=diff
==============================================================================
--- llvm/trunk/include/llvm/BinaryFormat/MachO.h (original)
+++ llvm/trunk/include/llvm/BinaryFormat/MachO.h Thu Jul 26 22:38:14 2018
@@ -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
Modified: llvm/trunk/include/llvm/ProfileData/InstrProf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/ProfileData/InstrProf.h?rev=338099&r1=338098&r2=338099&view=diff
==============================================================================
--- llvm/trunk/include/llvm/ProfileData/InstrProf.h (original)
+++ llvm/trunk/include/llvm/ProfileData/InstrProf.h Thu Jul 26 22:38:14 2018
@@ -1021,7 +1021,7 @@ template <> inline uint64_t getMagic<uin
// 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"
};
Modified: llvm/trunk/include/llvm/Support/AlignOf.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/AlignOf.h?rev=338099&r1=338098&r2=338099&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/AlignOf.h (original)
+++ llvm/trunk/include/llvm/Support/AlignOf.h Thu Jul 26 22:38:14 2018
@@ -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
Modified: llvm/trunk/include/llvm/Support/TrailingObjects.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/Support/TrailingObjects.h?rev=338099&r1=338098&r2=338099&view=diff
==============================================================================
--- llvm/trunk/include/llvm/Support/TrailingObjects.h (original)
+++ llvm/trunk/include/llvm/Support/TrailingObjects.h Thu Jul 26 22:38:14 2018
@@ -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
Modified: llvm/trunk/lib/Analysis/GlobalsModRef.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/GlobalsModRef.cpp?rev=338099&r1=338098&r2=338099&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/GlobalsModRef.cpp (original)
+++ llvm/trunk/lib/Analysis/GlobalsModRef.cpp Thu Jul 26 22:38:14 2018
@@ -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;
More information about the llvm-commits
mailing list