summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/Sema.cpp
diff options
context:
space:
mode:
authorAlexey Bataev <a.bataev@hotmail.com>2019-02-20 17:42:57 +0000
committerAlexey Bataev <a.bataev@hotmail.com>2019-02-20 17:42:57 +0000
commit5c96c1c5aa4afd5c1b13e69a029073b69c59bb23 (patch)
tree39b7bb68950dc80723b3a479e7c862998bf1d4b5 /clang/lib/Sema/Sema.cpp
parent19bceda8790e0ddb7bc890cf04259f8791e687d2 (diff)
downloadbcm5719-llvm-5c96c1c5aa4afd5c1b13e69a029073b69c59bb23.tar.gz
bcm5719-llvm-5c96c1c5aa4afd5c1b13e69a029073b69c59bb23.zip
[OPENMP] Delay emission of the asm target-specific error messages.
Summary: Added the ability to emit target-specific builtin assembler error messages only in case if the function is really is going to be emitted for the device. Reviewers: rjmccall Subscribers: guansong, jdoerfert, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D58243 llvm-svn: 354486
Diffstat (limited to 'clang/lib/Sema/Sema.cpp')
-rw-r--r--clang/lib/Sema/Sema.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang/lib/Sema/Sema.cpp b/clang/lib/Sema/Sema.cpp
index 87164a6ef34..bb1e264236f 100644
--- a/clang/lib/Sema/Sema.cpp
+++ b/clang/lib/Sema/Sema.cpp
@@ -1487,6 +1487,14 @@ void Sema::markKnownEmitted(
}
}
+Sema::DeviceDiagBuilder Sema::targetDiag(SourceLocation Loc,
+ unsigned DiagID) {
+ if (LangOpts.OpenMP && LangOpts.OpenMPIsDevice)
+ return diagIfOpenMPDeviceCode(Loc, DiagID);
+ return DeviceDiagBuilder(DeviceDiagBuilder::K_Immediate, Loc, DiagID,
+ getCurFunctionDecl(), *this);
+}
+
/// Looks through the macro-expansion chain for the given
/// location, looking for a macro expansion with the given name.
/// If one is found, returns true and sets the location to that
OpenPOWER on IntegriCloud