diff options
| author | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:14:23 -0700 |
|---|---|---|
| committer | Alex Crichton <alex@alexcrichton.com> | 2014-09-29 08:14:23 -0700 |
| commit | 7784a8d39773517da476a19562cea0ef0cd36eab (patch) | |
| tree | 603ee2b90f703e8d5f83a5b9ec5651e9672421d8 /src/libsyntax/ext | |
| parent | b7c002aac149618d4ef7e2ef5a1417c85631dddb (diff) | |
| parent | 8826fdfe37a7cbf901ddced1d7e2b4320e117461 (diff) | |
| download | rust-7784a8d39773517da476a19562cea0ef0cd36eab.tar.gz rust-7784a8d39773517da476a19562cea0ef0cd36eab.zip | |
rollup merge of #17592 : kmcallister/inline-asm-loc
Diffstat (limited to 'src/libsyntax/ext')
| -rw-r--r-- | src/libsyntax/ext/asm.rs | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/libsyntax/ext/asm.rs b/src/libsyntax/ext/asm.rs index 4b8c3376cad..702be0c0eee 100644 --- a/src/libsyntax/ext/asm.rs +++ b/src/libsyntax/ext/asm.rs @@ -13,6 +13,7 @@ */ use ast; +use codemap; use codemap::Span; use ext::base; use ext::base::*; @@ -198,6 +199,15 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) } } + let expn_id = cx.codemap().record_expansion(codemap::ExpnInfo { + call_site: sp, + callee: codemap::NameAndSpan { + name: "asm".to_string(), + format: codemap::MacroBang, + span: None, + }, + }); + MacExpr::new(P(ast::Expr { id: ast::DUMMY_NODE_ID, node: ast::ExprInlineAsm(ast::InlineAsm { @@ -208,7 +218,8 @@ pub fn expand_asm<'cx>(cx: &'cx mut ExtCtxt, sp: Span, tts: &[ast::TokenTree]) clobbers: token::intern_and_get_ident(cons.as_slice()), volatile: volatile, alignstack: alignstack, - dialect: dialect + dialect: dialect, + expn_id: expn_id, }), span: sp })) |
