Corresponding CL of thread flags for portable.
Change-Id: I6ad0c6159115e0d8879e0d9d674d760cd48f29c9
diff --git a/src/compiler_llvm/gbc_expander.cc b/src/compiler_llvm/gbc_expander.cc
index bcca08d..8750c0b 100644
--- a/src/compiler_llvm/gbc_expander.cc
+++ b/src/compiler_llvm/gbc_expander.cc
@@ -161,8 +161,6 @@
void Expand_MarkGCCard(llvm::CallInst& call_inst);
- llvm::Value* Expand_GetException();
-
llvm::Value* Expand_LoadStringFromDexCache(llvm::Value* string_idx_value);
llvm::Value* Expand_LoadTypeFromDexCache(llvm::Value* type_idx_value);
@@ -775,21 +773,6 @@
return;
}
-llvm::Value* GBCExpanderPass::Expand_GetException() {
- // Get thread-local exception field address
- llvm::Value* exception_object_addr =
- irb_.Runtime().EmitLoadFromThreadOffset(art::Thread::ExceptionOffset().Int32Value(),
- irb_.getJObjectTy(),
- kTBAAJRuntime);
-
- // Set thread-local exception field address to NULL
- irb_.Runtime().EmitStoreToThreadOffset(art::Thread::ExceptionOffset().Int32Value(),
- irb_.getJNull(),
- kTBAAJRuntime);
-
- return exception_object_addr;
-}
-
llvm::Value*
GBCExpanderPass::Expand_LoadStringFromDexCache(llvm::Value* string_idx_value) {
uint32_t string_idx =
@@ -2721,7 +2704,7 @@
return NULL;
}
case IntrinsicHelper::GetException: {
- return Expand_GetException();
+ return irb_.Runtime().EmitGetAndClearException();
}
case IntrinsicHelper::IsExceptionPending: {
return irb_.Runtime().EmitIsExceptionPending();