[clang] 742a06f - [clang] Remove #undef alloca workaround (#81534)

via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 13 09:49:26 PST 2024


Author: Arthur Eubanks
Date: 2024-02-13T09:49:22-08:00
New Revision: 742a06f577b4c3b1c1f994e91bb6579ae89fe4b0

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

LOG: [clang] Remove #undef alloca workaround (#81534)

Added in 26670dcba1609574cba5942aff78ff97b567c5f3 to workaround #4885.

Windows CI and a local Windows build are happy with this change, so it
seems like this has been properly fixed at some point. If this does
break somebody, this can be easily reverted. (Also, Linux does the same
`#define alloca` in system headers, so I'm not sure why it'd be
different on Windows)

This is tech debt that caused breakages, see comments on #71709.

Added: 
    

Modified: 
    clang/include/clang/Basic/Builtins.h

Removed: 
    


################################################################################
diff  --git a/clang/include/clang/Basic/Builtins.h b/clang/include/clang/Basic/Builtins.h
index f955d21169556..6700d1903a008 100644
--- a/clang/include/clang/Basic/Builtins.h
+++ b/clang/include/clang/Basic/Builtins.h
@@ -20,10 +20,6 @@
 #include "llvm/ADT/StringRef.h"
 #include <cstring>
 
-// VC++ defines 'alloca' as an object-like macro, which interferes with our
-// builtins.
-#undef alloca
-
 namespace clang {
 class TargetInfo;
 class IdentifierTable;


        


More information about the cfe-commits mailing list