public:
FDHandle() : FD(-1) {}
FDHandle(int fd) : FD(fd) {}
- ~FDHandle();
+ ~FDHandle() throw();
operator int() const { return FD; }
- FDHandle &operator=(int fd);
+ FDHandle &operator=(int fd) throw();
/// take - Take ownership of the file descriptor away from the FDHandle
/// object, so that the file is not closed when the FDHandle is destroyed.
- int take();
+ int take() throw();
};
} // End llvm namespace
public:
FDHandle() : FD(-1) {}
FDHandle(int fd) : FD(fd) {}
- ~FDHandle();
+ ~FDHandle() throw();
operator int() const { return FD; }
- FDHandle &operator=(int fd);
+ FDHandle &operator=(int fd) throw();
/// take - Take ownership of the file descriptor away from the FDHandle
/// object, so that the file is not closed when the FDHandle is destroyed.
- int take();
+ int take() throw();
};
} // End llvm namespace
// FDHandle class implementation
//
-FDHandle::~FDHandle() {
+FDHandle::~FDHandle() throw() {
if (FD != -1) close(FD);
}
-FDHandle &FDHandle::operator=(int fd) {
+FDHandle &FDHandle::operator=(int fd) throw() {
if (FD != -1) close(FD);
FD = fd;
return *this;
/// take - Take ownership of the file descriptor away from the FDHandle
/// object, so that the file is not closed when the FDHandle is destroyed.
-int FDHandle::take() {
+int FDHandle::take() throw() {
int Ret = FD;
FD = -1;
return Ret;