diff options
| author | LemonBoy <thatlemon@gmail.com> | 2019-12-02 21:07:44 +0100 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-12-02 19:53:06 -0500 |
| commit | 26c8930b9594ab320b0e3add682e99063491142e (patch) | |
| tree | 7c7162c26e30f92598cdcbf4a2309512bcdfd373 /src/codegen.cpp | |
| parent | b7be57766b8c6d7fee27fd7c23e8c999a134bb27 (diff) | |
| download | zig-26c8930b9594ab320b0e3add682e99063491142e.tar.gz zig-26c8930b9594ab320b0e3add682e99063491142e.zip | |
Accept comptime-known expression for asm
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 06834a7e4b..dc29e8f4b1 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -4437,7 +4437,7 @@ static size_t find_asm_index(CodeGen *g, AstNode *node, AsmToken *tok, Buf *src_ return SIZE_MAX; } -static LLVMValueRef ir_render_asm(CodeGen *g, IrExecutable *executable, IrInstructionAsm *instruction) { +static LLVMValueRef ir_render_asm_gen(CodeGen *g, IrExecutable *executable, IrInstructionAsmGen *instruction) { AstNode *asm_node = instruction->base.source_node; assert(asm_node->type == NodeTypeAsmExpr); AstNodeAsmExpr *asm_expr = &asm_node->data.asm_expr; @@ -6135,7 +6135,6 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable, case IrInstructionIdPtrCastSrc: case IrInstructionIdCmpxchgSrc: case IrInstructionIdLoadPtr: - case IrInstructionIdGlobalAsm: case IrInstructionIdHasDecl: case IrInstructionIdUndeclaredIdent: case IrInstructionIdCallSrc: @@ -6156,6 +6155,7 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable, case IrInstructionIdAwaitSrc: case IrInstructionIdSplatSrc: case IrInstructionIdMergeErrSets: + case IrInstructionIdAsmSrc: zig_unreachable(); case IrInstructionIdDeclVarGen: @@ -6192,8 +6192,8 @@ static LLVMValueRef ir_render_instruction(CodeGen *g, IrExecutable *executable, return ir_render_struct_field_ptr(g, executable, (IrInstructionStructFieldPtr *)instruction); case IrInstructionIdUnionFieldPtr: return ir_render_union_field_ptr(g, executable, (IrInstructionUnionFieldPtr *)instruction); - case IrInstructionIdAsm: - return ir_render_asm(g, executable, (IrInstructionAsm *)instruction); + case IrInstructionIdAsmGen: + return ir_render_asm_gen(g, executable, (IrInstructionAsmGen *)instruction); case IrInstructionIdTestNonNull: return ir_render_test_non_null(g, executable, (IrInstructionTestNonNull *)instruction); case IrInstructionIdOptionalUnwrapPtr: |
