diff options
| author | Michael Woerister <michaelwoerister@posteo> | 2018-08-07 16:03:57 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@posteo> | 2018-08-10 10:22:44 +0200 |
| commit | 9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15 (patch) | |
| tree | e8c9e6ad76c04c6efd5ad85fbe6946f528cf5e54 /src/librustc_codegen_llvm/debuginfo | |
| parent | f6d43ed84207c7e58f363f46e5a438ff40f2b311 (diff) | |
| download | rust-9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15.tar.gz rust-9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15.zip | |
Introduce const_cstr!() macro and use it where applicable.
Diffstat (limited to 'src/librustc_codegen_llvm/debuginfo')
| -rw-r--r-- | src/librustc_codegen_llvm/debuginfo/metadata.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs index 8ee2404e10c..3bd1a1519b6 100644 --- a/src/librustc_codegen_llvm/debuginfo/metadata.rs +++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs @@ -883,7 +883,7 @@ pub fn compile_unit_metadata(tcx: TyCtxt, gcov_cu_info.as_ptr(), gcov_cu_info.len() as c_uint); - let llvm_gcov_ident = CString::new("llvm.gcov").unwrap(); + let llvm_gcov_ident = const_cstr!("llvm.gcov"); llvm::LLVMAddNamedMetadataOperand(debug_context.llmod, llvm_gcov_ident.as_ptr(), gcov_metadata); @@ -1780,7 +1780,7 @@ pub fn create_vtable_metadata( // later on in llvm/lib/IR/Value.cpp. let empty_array = create_DIArray(DIB(cx), &[]); - let name = CString::new("vtable").unwrap(); + let name = const_cstr!("vtable"); // Create a new one each time. We don't want metadata caching // here, because each vtable will refer to a unique containing |
