forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #398 from llvm/main
[pull] main from llvm:main
- Loading branch information
Showing
117 changed files
with
867 additions
and
577 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,25 @@ | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg \ | ||
// RUN: -mstack-protector-guard-reg=sp_el0 \ | ||
// RUN: -mstack-protector-guard-offset=1024 \ | ||
// RUN: -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -emit-llvm %s -o - | FileCheck --check-prefix=CHECK-NONE %s | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple x86_64-linux-gnu \ | ||
// RUN: -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple powerpc64le-linux-gnu \ | ||
// RUN: -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple arm-linux-gnueabi \ | ||
// RUN: -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple thumbv7-linux-gnueabi \ | ||
// RUN: -mstack-protector-guard-offset=1024 -emit-llvm %s -o - | FileCheck %s | ||
// RUN: %clang_cc1 -mstack-protector-guard=sysreg -triple aarch64-linux-gnu \ | ||
// RUN: -mstack-protector-guard-offset=1024 -mstack-protector-guard-reg=sp_el0 \ | ||
// RUN: -emit-llvm %s -o - | FileCheck %s --check-prefix=AARCH64 | ||
void foo(int*); | ||
void bar(int x) { | ||
int baz[x]; | ||
foo(baz); | ||
} | ||
|
||
// CHECK: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]], [[ATTR3:![0-9]+]]} | ||
// CHECK: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]]} | ||
// CHECK: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"} | ||
// CHECK: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"} | ||
// CHECK: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024} | ||
// CHECK-NONE-NOT: !"stack-protector-guard | ||
// CHECK: [[ATTR2]] = !{i32 1, !"stack-protector-guard-offset", i32 1024} | ||
|
||
// AARCH64: !llvm.module.flags = !{{{.*}}[[ATTR1:![0-9]+]], [[ATTR2:![0-9]+]], [[ATTR3:![0-9]+]]} | ||
// AARCH64: [[ATTR1]] = !{i32 1, !"stack-protector-guard", !"sysreg"} | ||
// AARCH64: [[ATTR2]] = !{i32 1, !"stack-protector-guard-reg", !"sp_el0"} | ||
// AARCH64: [[ATTR3]] = !{i32 1, !"stack-protector-guard-offset", i32 1024} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Extend the path in `base_path` with the path in `current_segment`, returning | ||
# the result in `joined_path`. If `current_segment` is an absolute path then | ||
# just return it, in effect overriding `base_path`, and issue a warning. | ||
# | ||
# Note that the code returns a relative path (avoiding introducing leading | ||
# slashes) if `base_path` is empty. | ||
function(extend_path joined_path base_path current_segment) | ||
if("${current_segment}" STREQUAL "") | ||
set(temp_path "${base_path}") | ||
elseif("${base_path}" STREQUAL "") | ||
set(temp_path "${current_segment}") | ||
elseif(IS_ABSOLUTE "${current_segment}") | ||
message(WARNING "Since \"${current_segment}\" is absolute, it overrides base path: \"${base_path}\".") | ||
set(temp_path "${current_segment}") | ||
else() | ||
set(temp_path "${base_path}/${current_segment}") | ||
endif() | ||
set(${joined_path} "${temp_path}" PARENT_SCOPE) | ||
endfunction() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.