[llvm] dcab8e6 - [Support] Remove unused LLVM_PTR_SIZE macro

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 20 03:28:48 PDT 2022


Author: Nikita Popov
Date: 2022-04-20T12:27:37+02:00
New Revision: dcab8e60c5b372afe898259e4e282e99208e33cd

URL: https://github.com/llvm/llvm-project/commit/dcab8e60c5b372afe898259e4e282e99208e33cd
DIFF: https://github.com/llvm/llvm-project/commit/dcab8e60c5b372afe898259e4e282e99208e33cd.diff

LOG: [Support] Remove unused LLVM_PTR_SIZE macro

This was used for LLVM_ALIGNAS() arguments in the past, but has
since been superseded by plain alignas() which also accepts a type.

Added: 
    

Modified: 
    llvm/include/llvm/Support/Compiler.h

Removed: 
    


################################################################################
diff  --git a/llvm/include/llvm/Support/Compiler.h b/llvm/include/llvm/Support/Compiler.h
index 65345ba0c7f68..6708b7cc95cc8 100644
--- a/llvm/include/llvm/Support/Compiler.h
+++ b/llvm/include/llvm/Support/Compiler.h
@@ -396,22 +396,6 @@
 # define LLVM_PACKED_END   _Pragma("pack(pop)")
 #endif
 
-/// \macro LLVM_PTR_SIZE
-/// A constant integer equivalent to the value of sizeof(void*).
-/// Generally used in combination with alignas or when doing computation in the
-/// preprocessor.
-#ifdef __SIZEOF_POINTER__
-# define LLVM_PTR_SIZE __SIZEOF_POINTER__
-#elif defined(_WIN64)
-# define LLVM_PTR_SIZE 8
-#elif defined(_WIN32)
-# define LLVM_PTR_SIZE 4
-#elif defined(_MSC_VER)
-# error "could not determine LLVM_PTR_SIZE as a constant int for MSVC"
-#else
-# define LLVM_PTR_SIZE sizeof(void *)
-#endif
-
 /// \macro LLVM_MEMORY_SANITIZER_BUILD
 /// Whether LLVM itself is built with MemorySanitizer instrumentation.
 #if __has_feature(memory_sanitizer)


        


More information about the llvm-commits mailing list