aboutsummaryrefslogtreecommitdiff
path: root/src/codegen.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-02-01 20:13:36 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-02-01 20:13:36 -0700
commita2035eefba0fe8f29d0bcffbe254c066fc97069b (patch)
tree63993adc8abbf5e8dfc6564215c505d9ba1a23bf /src/codegen.cpp
parent74eaf4376800ab1a3405a69e4f65ecfecb1e1db9 (diff)
downloadzig-a2035eefba0fe8f29d0bcffbe254c066fc97069b.tar.gz
zig-a2035eefba0fe8f29d0bcffbe254c066fc97069b.zip
codegen: avoid table lookup in assembly expression
Diffstat (limited to 'src/codegen.cpp')
-rw-r--r--src/codegen.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp
index 16797881c5..b32bebc307 100644
--- a/src/codegen.cpp
+++ b/src/codegen.cpp
@@ -1822,7 +1822,7 @@ static LLVMValueRef gen_asm_expr(CodeGen *g, AstNode *node) {
}
if (!is_return) {
- VariableTableEntry *variable = find_variable( node->block_context, &asm_output->variable_name);
+ VariableTableEntry *variable = asm_output->variable;
assert(variable);
param_types[param_index] = LLVMTypeOf(variable->value_ref);
param_values[param_index] = variable->value_ref;