Skip to content

Commit 00bf24a

Browse files
committed
rebase
Created using spr 1.3.8-beta.1
2 parents d3e693f + 00806fe commit 00bf24a

File tree

6 files changed

+35
-9
lines changed

6 files changed

+35
-9
lines changed

clang/docs/ClangLinkerWrapper.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ This tool works as a wrapper of the normal host linking job. This tool is used
1414
to create linked device images for offloading and the necessary runtime calls to
1515
register them. It works by first scanning the linker's input for embedded device
1616
offloading data stored at the ``.llvm.offloading`` section. This section
17-
contains binary data created by the :doc:`ClangOffloadPackager`. The extracted
18-
device files will then be linked. The linked modules will then be wrapped into a
19-
new object file containing the code necessary to register it with the offloading
20-
runtime.
17+
contains binary data created by the ``llvm-offload-binary`` utility. The
18+
extracted device files will then be linked. The linked modules will then be
19+
wrapped into a new object file containing the code necessary to register it with
20+
the offloading runtime.
2121

2222
Usage
2323
=====

clang/docs/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,6 @@ Using Clang Tools
102102
ClangLinkerWrapper
103103
ClangNVLinkWrapper
104104
ClangOffloadBundler
105-
ClangOffloadPackager
106105
ClangRepl
107106
ClangSYCLLinker
108107

clang/lib/StaticAnalyzer/Checkers/WebKit/ASTUtils.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ bool tryToFindPtrOrigin(
3131
if (auto *DRE = dyn_cast<DeclRefExpr>(E)) {
3232
if (auto *VD = dyn_cast_or_null<VarDecl>(DRE->getDecl())) {
3333
auto QT = VD->getType();
34-
if (VD->hasGlobalStorage() && QT.isConstQualified()) {
34+
auto IsImmortal = safeGetName(VD) == "NSApp";
35+
if (VD->hasGlobalStorage() && (IsImmortal || QT.isConstQualified()))
3536
return callback(E, true);
36-
}
3737
}
3838
}
3939
if (auto *tempExpr = dyn_cast<MaterializeTemporaryExpr>(E)) {
@@ -208,6 +208,8 @@ bool tryToFindPtrOrigin(
208208
continue;
209209
}
210210
if (auto *BoxedExpr = dyn_cast<ObjCBoxedExpr>(E)) {
211+
if (StopAtFirstRefCountedObj)
212+
return callback(BoxedExpr, true);
211213
E = BoxedExpr->getSubExpr();
212214
continue;
213215
}

clang/test/Analysis/Checkers/WebKit/objc-mock-types.h

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,22 @@ __attribute__((objc_root_class))
178178
+ (NSNumber *)numberWithBool:(BOOL)value;
179179
@end
180180

181+
@interface NSResponder : NSObject
182+
@end
183+
184+
@interface NSApplication : NSResponder
185+
186+
extern NSApplication * NSApp;
187+
188+
@property (class, readonly, strong) NSApplication *sharedApplication;
189+
190+
- (void)finishLaunching;
191+
- (void)run;
192+
- (void)stop:(id)sender;
193+
- (void)terminate:(id)sender;
194+
195+
@end
196+
181197
@interface SomeObj : NSObject
182198
- (instancetype)_init;
183199
- (SomeObj *)mutableCopy;

clang/test/Analysis/Checkers/WebKit/unretained-call-args.mm

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -398,12 +398,18 @@ void foo() {
398398
void baz(const NSDictionary *);
399399
void boo(NSNumber *);
400400
void boo(CFTypeRef);
401-
void foo() {
401+
402+
struct Details {
403+
int value;
404+
};
405+
406+
void foo(Details* details) {
402407
CFArrayCreateMutable(kCFAllocatorDefault, 10);
403408
bar(@[@"hello"]);
404409
baz(@{@"hello": @3});
405410
boo(@YES);
406411
boo(@NO);
412+
boo(@(details->value));
407413
}
408414
}
409415

@@ -582,6 +588,7 @@ - (void)doWorkOnSelf {
582588
[self doWork:@"hello", RetainPtr<SomeObj> { provide() }.get(), RetainPtr<CFMutableArrayRef> { provide_cf() }.get(), OSObjectPtr { provide_dispatch() }.get()];
583589
[self doWork:__null];
584590
[self doWork:nil];
591+
[NSApp run];
585592
}
586593

587594
- (SomeObj *)getSomeObj {

libc/src/__support/RPC/rpc_server.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,9 @@ LIBC_INLINE static rpc::Status handle_port_impl(rpc::Server::Port &port) {
395395
port.recv([](rpc::Buffer *buffer, uint32_t) {
396396
int status = 0;
397397
__builtin_memcpy(&status, buffer->data, sizeof(int));
398-
exit(status);
398+
// We want a quick exit to avoid conflicts with offloading library
399+
// teardowns when called from the GPU.
400+
quick_exit(status);
399401
});
400402
break;
401403
}

0 commit comments

Comments
 (0)