diff options
author | Erik Pilkington <erik.pilkington@gmail.com> | 2019-03-19 20:44:18 +0000 |
---|---|---|
committer | Erik Pilkington <erik.pilkington@gmail.com> | 2019-03-19 20:44:18 +0000 |
commit | b8a5f1f4bfd8036e2bd5ae465c923e895a80f91d (patch) | |
tree | 89e7540fbb0bb83b486e487fbb932094dba9254d /test/CodeGenCXX | |
parent | c96f4c0bde7858f97b310c87ea824c458301e169 (diff) |
Add a spelling of pass_object_size that uses __builtin_dynamic_object_size
The attribute pass_dynamic_object_size(n) behaves exactly like
pass_object_size(n), but instead of evaluating __builtin_object_size on calls,
it evaluates __builtin_dynamic_object_size, which has the potential to produce
runtime code when the object size can't be determined statically.
Differential revision: https://reviews.llvm.org/D58757
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@356515 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGenCXX')
-rw-r--r-- | test/CodeGenCXX/mangle-ms.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/test/CodeGenCXX/mangle-ms.cpp b/test/CodeGenCXX/mangle-ms.cpp index 0175b961e5..75ca3af825 100644 --- a/test/CodeGenCXX/mangle-ms.cpp +++ b/test/CodeGenCXX/mangle-ms.cpp @@ -457,6 +457,8 @@ int bar(int *const i __attribute__((pass_object_size(1)))) { return 0; } int qux(int *const i __attribute__((pass_object_size(1))), int *const j __attribute__((pass_object_size(0)))) { return 0; } // CHECK-DAG: define dso_local i32 @"?zot@PassObjectSize@@YAHQAHW4__pass_object_size1@__clang@@01@Z" int zot(int *const i __attribute__((pass_object_size(1))), int *const j __attribute__((pass_object_size(1)))) { return 0; } +// CHECK-DAG: define dso_local i32 @"?silly_word@PassObjectSize@@YAHQAHW4__pass_dynamic_object_size1@__clang@@@Z" +int silly_word(int *const i __attribute__((pass_dynamic_object_size(1)))) { return 0; } } namespace Atomic { |