summary refs log tree commit diff
path: root/src/librustc_codegen_llvm/builder.rs
diff options
context:
space:
mode:
authorMichael Woerister <michaelwoerister@posteo>2018-08-07 16:03:57 +0200
committerMichael Woerister <michaelwoerister@posteo>2018-08-10 10:22:44 +0200
commit9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15 (patch)
treee8c9e6ad76c04c6efd5ad85fbe6946f528cf5e54 /src/librustc_codegen_llvm/builder.rs
parentf6d43ed84207c7e58f363f46e5a438ff40f2b311 (diff)
downloadrust-9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15.tar.gz
rust-9585c5dc1fa3cef34ebdc5a5d39af88db60c6f15.zip
Introduce const_cstr!() macro and use it where applicable.
Diffstat (limited to 'src/librustc_codegen_llvm/builder.rs')
-rw-r--r--src/librustc_codegen_llvm/builder.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/librustc_codegen_llvm/builder.rs b/src/librustc_codegen_llvm/builder.rs
index b174cd8c7ac..bc82886714a 100644
--- a/src/librustc_codegen_llvm/builder.rs
+++ b/src/librustc_codegen_llvm/builder.rs
@@ -975,7 +975,7 @@ impl Builder<'a, 'll, 'tcx> {
                        parent: Option<&'ll Value>,
                        args: &[&'ll Value]) -> &'ll Value {
         self.count_insn("cleanuppad");
-        let name = CString::new("cleanuppad").unwrap();
+        let name = const_cstr!("cleanuppad");
         let ret = unsafe {
             llvm::LLVMRustBuildCleanupPad(self.llbuilder,
                                           parent,
@@ -1001,7 +1001,7 @@ impl Builder<'a, 'll, 'tcx> {
                      parent: &'ll Value,
                      args: &[&'ll Value]) -> &'ll Value {
         self.count_insn("catchpad");
-        let name = CString::new("catchpad").unwrap();
+        let name = const_cstr!("catchpad");
         let ret = unsafe {
             llvm::LLVMRustBuildCatchPad(self.llbuilder, parent,
                                         args.len() as c_uint, args.as_ptr(),
@@ -1025,7 +1025,7 @@ impl Builder<'a, 'll, 'tcx> {
         num_handlers: usize,
     ) -> &'ll Value {
         self.count_insn("catchswitch");
-        let name = CString::new("catchswitch").unwrap();
+        let name = const_cstr!("catchswitch");
         let ret = unsafe {
             llvm::LLVMRustBuildCatchSwitch(self.llbuilder, parent, unwind,
                                            num_handlers as c_uint,