forked from llvm-mirror/llvm
-
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.
Use TARGET2 relocation for TType references on ARM.
Do some cleanup of the code while here. Inspired by patch by Logan Chien! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@167904 91177308-0d34-0410-b5e6-96231b3b80d8
- Loading branch information
Showing
12 changed files
with
137 additions
and
83 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
; RUN: llc -mtriple=armv7-none-linux-gnueabi -arm-enable-ehabi -arm-enable-ehabi-descriptors < %s | FileCheck %s | ||
|
||
@_ZTVN10__cxxabiv117__class_type_infoE = external global i8* | ||
@_ZTS3Foo = linkonce_odr constant [5 x i8] c"3Foo\00" | ||
@_ZTI3Foo = linkonce_odr unnamed_addr constant { i8*, i8* } { i8* bitcast (i8** getelementptr inbounds (i8** @_ZTVN10__cxxabiv117__class_type_infoE, i32 2) to i8*), i8* getelementptr inbounds ([5 x i8]* @_ZTS3Foo, i32 0, i32 0) } | ||
|
||
define i32 @main() { | ||
entry: | ||
invoke void @_Z3foov() | ||
to label %return unwind label %lpad | ||
|
||
lpad: ; preds = %entry | ||
%0 = landingpad { i8*, i32 } personality i8* bitcast (i32 (...)* @__gxx_personality_v0 to i8*) | ||
catch i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*) | ||
%1 = extractvalue { i8*, i32 } %0, 1 | ||
%2 = tail call i32 @llvm.eh.typeid.for(i8* bitcast ({ i8*, i8* }* @_ZTI3Foo to i8*)) nounwind | ||
; CHECK: _ZTI3Foo(target2) | ||
|
||
%matches = icmp eq i32 %1, %2 | ||
br i1 %matches, label %catch, label %eh.resume | ||
|
||
catch: ; preds = %lpad | ||
%3 = extractvalue { i8*, i32 } %0, 0 | ||
%4 = tail call i8* @__cxa_begin_catch(i8* %3) nounwind | ||
tail call void @__cxa_end_catch() | ||
br label %return | ||
|
||
return: ; preds = %entry, %catch | ||
%retval.0 = phi i32 [ 1, %catch ], [ 0, %entry ] | ||
ret i32 %retval.0 | ||
|
||
eh.resume: ; preds = %lpad | ||
resume { i8*, i32 } %0 | ||
} | ||
|
||
declare void @_Z3foov() | ||
|
||
declare i32 @__gxx_personality_v0(...) | ||
|
||
declare i32 @llvm.eh.typeid.for(i8*) nounwind readnone | ||
|
||
declare i8* @__cxa_begin_catch(i8*) | ||
|
||
declare void @__cxa_end_catch() |