]> granicus.if.org Git - clang/commitdiff
bpf: teach BPF driver about the new CPU "v3"
authorJiong Wang <jiwang@tilera.com>
Thu, 7 Feb 2019 22:51:56 +0000 (22:51 +0000)
committerJiong Wang <jiwang@tilera.com>
Thu, 7 Feb 2019 22:51:56 +0000 (22:51 +0000)
This patch simply teach BPF driver about the new CPU "v3" introduced in
LLVM backend.

Acked-by: Yonghong Song <yhs@fb.com>
Signed-off-by: Jiong Wang <jiong.wang@netronome.com>
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@353479 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Basic/Targets/BPF.cpp
test/Misc/target-invalid-cpu-note.c

index ec5e6ad637f107bdc818ac1e22b65eb51c175b7e..e0527db59c979606068452d08b4029d1edaa769f 100644 (file)
@@ -25,7 +25,7 @@ void BPFTargetInfo::getTargetDefines(const LangOptions &Opts,
 }
 
 static constexpr llvm::StringLiteral ValidCPUNames[] = {"generic", "v1", "v2",
-                                                        "probe"};
+                                                        "v3", "probe"};
 
 bool BPFTargetInfo::isValidCPUName(StringRef Name) const {
   return llvm::find(ValidCPUNames, Name) != std::end(ValidCPUNames);
index babfaa9ffcb44fd3df1a95f52672f53dec45d3ed..7a37edaa7bba87930dbffb4d77f92a4399550ab6 100644 (file)
 
 // RUN: not %clang_cc1 -triple bpf--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix BPF
 // BPF: error: unknown target CPU 'not-a-cpu'
-// BPF: note: valid target CPU values are: generic, v1, v2, probe
+// BPF: note: valid target CPU values are: generic, v1, v2, v3, probe
 
 // RUN: not %clang_cc1 -triple avr--- -target-cpu not-a-cpu -fsyntax-only %s 2>&1 | FileCheck %s --check-prefix AVR
 // AVR: error: unknown target CPU 'not-a-cpu'