summaryrefslogtreecommitdiffstats
path: root/clang/lib/Frontend/CompilerInvocation.cpp
diff options
context:
space:
mode:
authorEtienne Bergeron <etienneb@google.com>2016-07-27 16:16:54 +0000
committerEtienne Bergeron <etienneb@google.com>2016-07-27 16:16:54 +0000
commit8c6eb1566c28aadbcf43208ab984e8c50b7e1c6f (patch)
treea6a1784c207591dd551316f203ac6aa1e8b8d1dc /clang/lib/Frontend/CompilerInvocation.cpp
parent271ca4011898792916a8aa15c417d8187abbd70b (diff)
downloadbcm5719-llvm-8c6eb1566c28aadbcf43208ab984e8c50b7e1c6f.tar.gz
bcm5719-llvm-8c6eb1566c28aadbcf43208ab984e8c50b7e1c6f.zip
[compiler-rt] Fix warnings in interception code
Summary: This patch is re-introducing the code to fix the dynamic hooking on windows and to fix a compiler warning on Apple. Related patches: * https://reviews.llvm.org/D22641 * https://reviews.llvm.org/D22610 * https://reviews.llvm.org/rL276311 * https://reviews.llvm.org/rL276490 Both architecture are using different techniques to hook on library functions (memchr, strcpy,...). On Apple, the function is not dynamically hooked and the symbol always points to a valid function (i.e. can't be null). The REAL macro returns the symbol. On windows, the function is dynamically patch and the REAL(...) function may or may not be null. It depend on whether or not the function was hooked correctly. Also, on windows memcpy and memmove are the same. ``` #if !defined(__APPLE__) [...] # define REAL(x) __interception::PTR_TO_REAL(x) # define ASSIGN_REAL(dst, src) REAL(dst) = REAL(src) [...] #else // __APPLE__ [...] # define REAL(x) x # define ASSIGN_REAL(x, y) [...] #endif // __APPLE__ Reviewers: rnk Subscribers: kcc, hans, kubabrecka, llvm-commits, bruno, chrisha Differential Revision: https://reviews.llvm.org/D22758 llvm-svn: 276885
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud