Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions clang/lib/Basic/Targets/BPF.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts,
Builder.defineMacro("__BPF_FEATURE_GOTOL");
Builder.defineMacro("__BPF_FEATURE_ST");
Builder.defineMacro("__BPF_FEATURE_LOAD_ACQ_STORE_REL");
Builder.defineMacro("__BPF_FEATURE_GOTOX");
}
}

Expand Down
4 changes: 4 additions & 0 deletions clang/test/Preprocessor/bpf-predefined-macros.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ int u;
#ifdef __BPF_FEATURE_LOAD_ACQ_STORE_REL
int v;
#endif
#ifdef __BPF_FEATURE_GOTOX
int w;
#endif

// CHECK: int b;
// CHECK: int c;
Expand Down Expand Up @@ -110,6 +113,7 @@ int v;
// CPU_V4: int u;

// CPU_V4: int v;
// CPU_V4: int w;

// CPU_GENERIC: int g;

Expand Down