Skip to content

Commit 40fe31f

Browse files
authored
Update InitPreprocessor.cpp
1 parent a589459 commit 40fe31f

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

clang/lib/Frontend/InitPreprocessor.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1337,6 +1337,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
13371337
// Get other target #defines.
13381338
TI.getTargetDefines(LangOpts, Builder);
13391339

1340+
#ifdef _WIN32
13401341
// #define offsetof
13411342
Builder.append("#ifndef offsetof");
13421343
Builder.append("#if defined _MSC_VER && !defined _CRT_USE_BUILTIN_OFFSETOF");
@@ -1349,6 +1350,7 @@ static void InitializePredefinedMacros(const TargetInfo &TI,
13491350
Builder.append(" #define offsetof(s,m) __builtin_offsetof(s,m)");
13501351
Builder.append("#endif");
13511352
Builder.append("#endif");
1353+
#endif
13521354
}
13531355

13541356
/// InitializePreprocessor - Initialize the preprocessor getting it and the

0 commit comments

Comments
 (0)